import os
import sys

# 请在此输入您的代码
ans = 0
s = list(input())
t = list(input())
n = len(s)

for i in range(n):
  if s[i] == t[i]:
    continue
  if s[i+1] == '*':
    s[i+ 1] = 'o'
  else:
    s[i + 1] = '*'
  ans += 1
print(ans)
